<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html,
        body {
            height: 100%;
            overflow: hidden;
            padding: 0;
            margin: 0;
        }
        /* 使用calc */
        /* .container {
            height: 100%;
        }
        
        .container div {
            position: relative;
            min-height: 200px;
            float: left;
        }
        
        .center {
            width: calc(100% - 400px);
            min-height: 400px;
            background-color: lightpink;
        }
        
        .left {
            width: 200px;
            background-color: lightskyblue;
        }
        
        .right {
            width: 200px;
            background-color: lightskyblue;
        } */
        /* flex布局 */
        
        .container {
            display: flex;
            justify-content: space-between;
        }
        
        .container div {
            min-height: 200px;
        }
        
        .left,
        .right {
            /* flex三个属性: 放大 缩小 所占位置 */
            flex: 0 0 200px;
            background-color: lightskyblue;
        }
        
        .center {
            /* 分配剩余空间 */
            flex: 1;
            background-color: lightsalmon;
        }
    </style>
</head>

<body>
    <!-- 圣杯布局 一个容器中间 左边右边/// 使用calc -->
    <div class="container clearfix">
        <div class="left"></div>
        <div class="center"></div>
        <div class="right"></div>
    </div>

</body>

</html>